<!doctype html>
<html>
<head>
    <title>微信商城</title>
    <meta charset="utf-8"/>
    <style type="text/css">
      *{
        list-style: none;
      }
    </style>
    <script type="text/javascript" src="__PUBLIC__/Moble_home/js/jquery.min.js"></script>
</head>
<body>
    <form action="__APP__/Home/Search/search" method="post">
        <input type="text" name="search" /><a class="search" href="javascript:;">搜索</a>
    </form>

    <h1>1.展示所有分类</h1>
    <div>
      <volist name="types_parent" id="value1">
        <h2>{$value1['type_name']}</h2>
        <volist name="types" id="value2">
            <if condition="$value1['type_id'] == $value2['main_type_id'] ">
              {$value2['type_name']}&nbsp;&nbsp;&nbsp;&nbsp;
            </if>
        </volist>
      </volist>
    </div>

    <h1>2.展示热销商品</h1>
    <volist name='hot_goods' id="value">
    <a href="__APP__/Home/GoodsInfo/goodsInfo/id/{$value['id']}">
    <menu>
          <li><img src="{$value['goods_image']}"></li>
          <li><h3>{$value['goods_name']}</h3></li>
          <li>市场价格：<del>{$value['market_price']}</del></li>
          <li>本地价格：{$value['local_price']}</li>
          <li>{$value['sales']}人购买</li>
    </menu>
    </a>
    </volist>

<!-- 使用ajax异步调用数据 -->
<script type="text/javascript">
//初始化页面需要加载的函数
$(function(){
  getLoveGoods();
});

function getLoveGoods(){
  $('.get_more').show();
  $.ajax({
    type : "get",
    url:"/__weixinShop/index.php/Home/Index/ajaxGetMore",
    dataType:'html',
    success: function(data)
    {
      if(data){
        $("#J_ItemList>ul").append(data);
        /*隐藏加载信息图片*/
        $('.get_more').hide();
      }else{
        $('.get_more').hide();
        $('#getmore').remove();
      }
    }
  }); 
}

$('.search').on('click', function(){
    $('form').submit();
});
</script> 

    <h1>3.猜你喜欢</h1>
    <div id="J_ItemList">
        <ul>
          <hr/>
        </ul>
        <a href="javascript:;" class="get_more" style="text-align:center; display:block;"> 
            <img src='__PUBLIC__/Moble_home/images/Loading.gif' width="12" height="12"> 
        </a> 
    </div>
    <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem;">
        <a href="javascript:void(0)" onclick="getLoveGoods()">点击加载更多</a>
    </div>
</body>
</html>  